RISC OS BBC BASIC V Source | 1994-09-18 | 22KB | 564 lines
> IconZ2:0_05
Animated TaskManager icon
David G Jones, 1994
This software is PD, do what you will with it.
$; " (Error code ";
); ")":
prog$ = "IconZ2"
vers$="0.06"
date$="09 Sep 1994"
command$="Desktop_IconZ2"
Update% = 5
NumberFrames% = 19 + 1
bl$ =
cr$ =
"Service_Reset = &27
assembly
"OS_File", 10, prog$, &FFA,, code, O%
assembly
code 4096
pass% = 4
O% = code: P% = 0
[ OPT pass%
! equd start
& equd initialize
$ equd finalize
!' equd serviceCall
"' equd titleString
#& equd helpString
$$ equd keyWords
equd 0
equd 0
equd 0
equd 0
*-.titleString equs prog$ +bl$: align
+[.helpString equs prog$+
(9)+vers$+" ("+date$+")
David G Jones"+bl$: align
.keyWords
.7.setUpdateName equs "IconZ2_Update" +bl$: align
/) equd setUpdateComm
0% equd &00010000
1" equd suHelp
2" equd suHelp
39.newSprites equs "IconZ2_Sprites" + bl$: align
4* equd newSpritesComm
5% equd &00010101
6" equd nsHelp
7" equd nsHelp
87.author equs "IconZ2_Author" +bl$: align
equd 0
:% equd &000F000F
;! equd aHelp
<! equd aHelp
.keyWord_End equd 0
.aHelp equs "Funky IconZ2 was created by David G Jones. If you have any comments then please get in contact:": equw &0A0D
AB equb 9: equs "160 Hazelwood Drive": equw &0A0D
B9 equb 9: equs "St. Albans": equw &0A0D
C= equb 9: equs "Herts. AL4 0UZ": equw &0A0D
D< equb 9: equs "0727 - 852548" +bl$: align
.suHelp equs "IconZ2_Update controls the delay between each frame in the animation. If no delay is given then the current value is shown. All delays are in centiseconds within the range 1 - 255.": equw &0A0D
d<.suValue equs "Current cs delay between frames: "
e+.suValue1
defineMemory(8): align
gX.nsHelp equs "IconZ2_Sprites will load the spritefile filename into IconZ. "
equs "This contains a number of sprites which are the separate frames in the animation. These should have the same dimensions and be named 'swch1', 'swch2' ...": equw &0A0D
iI equs "Syntax: *IconZ2_Sprites <filename>" +bl$: align
kD.nsNotSprite equd 0: equs "Must be a sprite file" +bl$: align
lf.nsNoSwch1 equd 0: equs "Spritefile must contain at least the first frame, swch1" +bl$: align
n'.newSpritesComm stmfd r13!, {r14}
o" mov r6, r1
; get details of file
q" mov r1, r0
r" mov r0, #5
s& swi "XOS_File"
t( ldmVSfd r13!, {pc}
u" teq r0, #1
v" movNE r2, r0
w# movNE r0, #19
x& swiNE "XOS_File"
y& ldmVSfd r13!, {pc}
z+ mov r2, r2, LSL #12
{/ mov r2, r2, LSR #12 + 8
|) mov r3, #&FF0
}) add r3, r3, #&009
~" teqEQ r2, r3
+ adrNE r0, nsNotSprite
% movNE r3, r15
7 orrNE r3, r3, #1 << 28; Clear V
% teqNEp r15, r3
( ldmVSfd r13!, {pc}
.; get a new RMA block to store new sprites
$ mov r0, #6
) add r3, r4, #16
* swi "XOS_Module"
( ldmVSfd r13!, {pc}
+; Initialize RMA block to a sprite area
* str r3, [r2, #0]
$ mov r0, #0
* str r0, [r2, #4]
+ str r0, [r2, #12]
% mov r0, #16
* str r0, [r2, #8]
'; Load sprites into new sprite area
$ mov r3, r2
$ mov r2, r1
$ mov r1, r3
& mov r0, #256
) add r0, r0, #10
, swi "XOS_SpriteOp"
( ldmVSfd r13!, {pc}
:; Ensure that there is at least swch1 sprite available
$ mov r0, #256
' add r0, r0, #24
1
adrl("", 2, IconSpriteStart)
* swi "XOS_SpriteOp"
) adrVS r0, nsNoSwch1
& ldmVSfd r13!, {pc}
1; delete existing sprite storage if it exists
' ldr r2, [r12]
$ teq r2, #0
$ movNE r0, #7
* swiNE "XOS_Module"
( ldmVSfd r13!, {pc}
' str r1, [r12]
K; Set up PollWord to be read so that a new icon bar icon can be created